﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using HZ.Supervise.Model;
using HZ.Supervise.Model.View;

namespace HZ.Supervise.IBLL
{
    public interface IExecuteContext
    {
        /// <summary>
        /// 批量删除消息
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        int DeleteMessage_Batch(IList<Model.Message> message);
        /// <summary>
        /// 修改消息(修改后消息会变成未读状态，发送时间也重新刷新)
        /// </summary> 
        int UpdateMessage(Model.Message message);
        /// <summary>
        /// 批量发送消息
        /// (消息粒度到机构到机构只有主用户或主用户授权用户才能够发送消息)
        /// </summary> 
        int AddMessage_Batch(IList<Model.Message> message); 
        /// <summary>
        /// 获取已经发送的消息
        /// (机构ID无需传入)
        /// </summary> 
        IList<Model.View.Message> GetMessageSent(Model.Query.QMessage where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取消息
        /// (机构ID无需传入)
        /// </summary> 
        IList<Model.View.Message> GetMessage(Model.Query.QMessage where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取已接收的公告
        /// </summary> 
        IList<Model.View.Notice> GetRecievedNotice(Model.Query.QNotice where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取已发布的公告
        /// </summary> 
        IList<Model.View.Notice> GetNotice(Model.Query.QNotice where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取待审核的公告
        /// </summary> 
        IList<Model.View.Notice> GetAuditNotice(Model.Query.QNotice where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 日志管理---日志查询
        /// </summary> 
        DataTable GetLog(string str, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 获得有效地区的产品列表
        /// 2011.3.29 by 张雄 modify
        /// </summary>
        /// <param name="proce"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns>产品列表</returns>
        //DataTable GetCompanyGoodsListArea(HZ.Supervise.Model.View.AreaProcureCatalog proce, int currentpage, int pagesize, string ConStrAreaId, out int totalrecord);

        /// <summary>
        /// 查询配置实体
        /// </summary>
        HZ.Supervise.Model.QueryObject QueryObject { get; set; }
        /// <summary>
        /// 执行查询，返回结果。
        /// </summary>
        /// <returns></returns>
        System.Data.DataTable Execute();
        /// <summary>
        /// 执行分页查询
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable ExecutePage(int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 配送企业
        /// by张雄 2011.5.12
        /// </summary>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页有多少行</param>
        /// <param name="totalrecord">参数</param>
        /// <returns>配送企业药品信息</returns>
        System.Data.DataTable ExecutePageCom(string where, string order, int currentpage, int pagesize, out int totalrecord);

        System.Data.DataTable ExecutePage_SC(string where, string order, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 所有药品信息
        /// by张雄 2011.5.12
        /// </summary>
        /// <param name="currentpage">当前的页数</param>
        /// <param name="pagesize">每页的条数</param>
        /// <param name="totalrecord"></param>
        /// <returns>药品信息</returns>
        System.Data.DataTable ExecutePageNew(string where, string order, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 曹鹏
        /// 2011年5月12日9:15:49
        /// 地区月报
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsAreaByMonth(string where);
        /// <summary>
        /// 曹鹏
        /// 2011年5月12日9:15:49
        /// 地区季报（细化的季报，每个月份都展示出来）
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsAreaBySeason(string where);
        /// <summary>
        /// 曹鹏
        /// 2011年5月12日9:15:49
        /// 地区年报（细化的年报，每个月份都展示出来）
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsAreaByYear(string where);

        /// <summary>
        /// 马良，报表饼图取数据
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsAreaByYearPie(string where);
        /// <summary>
        /// 曹鹏
        /// 2011年5月12日13:37:10
        /// 医院月报
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsHospitalByMonth(string hid, string year, string month);
        /// <summary>
        /// 曹鹏
        /// 2011年5月12日13:37:19
        /// 医院年报（细化的季报，每个月份都展示出来）
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsHospitalBySeason(string hid, string year, string Season);

        /// <summary>
        /// 企业季报表
        /// by张雄  2011.5.20
        /// </summary>
        /// <param name="where">条件参数</param>
        /// <returns>企业季度报表数据</returns>
        System.Data.DataTable StatisticsComBySeason(string where);


        /// <summary>
        /// 企业季度报表    饼状
        /// by张雄  2011.5.20
        /// </summary>
        /// <param name="where">where条件参数</param>
        /// <returns>企业季度报表数据</returns>
        System.Data.DataTable StatisticsComBySeasonPie(string where);


        /// <summary>
        /// 企业年报    饼图
        /// by张雄  2011.5.20
        /// </summary>
        /// <param name="where">参数</param>
        /// <returns>企业年报信息</returns>
        System.Data.DataTable StatisticsComByYearPie(string where);

        /// <summary>
        /// 企业年报
        /// by张雄  2011.5.20
        /// </summary>
        /// <param name="where">参数</param>
        /// <returns>企业年报信息</returns>
        System.Data.DataTable StatisticsComByYear(string where);



        /// <summary>
        /// 医院报表    饼图数据
        /// by张雄  2011.5.19
        /// </summary>
        /// <param name="hid"></param>
        /// <param name="year">年份</param>
        /// <param name="Season">季度</param>
        /// <returns></returns>
        System.Data.DataTable StatisticsHospitalBySeasonPie(string hid, string year, string Season);

        /// <summary>
        /// 曹鹏
        /// 2011年5月12日13:37:22
        /// 医院年报（细化的年报，每个月份都展示出来）
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsHospitalByYear(string hid, string timeFrom, string timeTo);


        /// <summary>
        /// 医院年报
        /// by张雄  2011.5.24
        /// </summary>
        /// <param name="hid"></param>
        /// <param name="timeFrom"></param>
        /// <param name="timeTo"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsHospitalByYearNew(string hname, string timeFrom, string timeTo);

        /// <summary>
        /// 曹鹏
        /// 2011年5月12日13:37:22
        /// 医院年报（细化的年报，每个月份都展示出来）（饼状图）
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable StatisticsHospitalByYearPie(string hid, string timeFrom, string timeTo);
        ///// <summary>
        ///// 执行分页查询
        ///// 肖梦兰
        ///// </summary>
        ///// <param name="currentpage"></param>
        ///// <param name="pagesize"></param>
        ///// <param name="totalrecord"></param>
        ///// <returns></returns>
        //System.Data.DataTable ExecutePage();

        DataTable ExecutePro(string where);

        ///// <summary>
        ///// 地区比对
        ///// </summary>
        ///// <param name="strHospitalId"></param>
        ///// <param name="strTimeFrom"></param>
        ///// <param name="strTimeTo"></param>
        ///// <returns></returns>
        //DataTable ExecuteHospital(string strHospitalId, string strTimeFrom, string strTimeTo);
        /// <summary>
        /// 曹鹏
        /// 2011年5月5日20:57:28
        /// 医院比对
        /// </summary>
        /// <param name="strHospitalId">查询条件</param>
        /// <returns></returns>
        DataTable ExecuteHospital(string whereHos);

        DataTable ExecuteAreaIDByCity(string where1);//modify by 曹鹏 2011年5月5日9:12:36 根据市查询数据

        DataTable ExecuteAreaIDOfCountry(string where2);//modify by 曹鹏 2011年5月5日9:12:36 根据县区查询数据


        /// <summary>
        /// 产品配送率 //i=0 表示地区分开的数据信息 ，i=1 表示不分地区汇总后的数据
        /// </summary>
        /// <param name="proce"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable getGoodsPSLList(int i, string where, string ordrby, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 医院药品汇总     //  
        /// JOHN
        /// </summary>
        /// <param name="i"></param>
        /// <param name="where"></param>
        /// <param name="ordrby"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable GetHospitalGoodsList(int i, string where, string ordrby, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 医院药品汇总     //  
        /// JOHN
        /// </summary>
        /// <param name="i"></param>
        /// <param name="where"></param>
        /// <param name="ordrby"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable GetHospitalGoods(int i, string where, string ordrby, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 按药品统计  by张雄
        /// </summary>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页显示的行数</param>
        /// <param name="totalrecord"></param>
        /// <returns>药品统计信息</returns>
        System.Data.DataTable GetGoodsInfoLList(string timeFrom, string timeTo, string timeFromH, string timeToH, string timeFromP, string timeToP, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 按企业统计-配送 by张雄
        /// </summary>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页显示的行数</param>
        /// <param name="totalrecord"></param>
        /// <returns>企业统计信息</returns>
        System.Data.DataTable GetCompanyInfo_PS(string timeFrom, string timeTo, string timeFromH, string timeToH, string timeFromP, string timeToP, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 按企业统计-生产 by张雄
        /// </summary>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页显示的行数</param>
        /// <param name="totalrecord"></param>
        /// <returns>企业统计信息</returns>
        System.Data.DataTable GetCompanyInfo_SC(string timeFrom, string timeTo, string timeFromH, string timeToH, string timeFromP, string timeToP, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 按地区统计 by张雄
        /// </summary>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页显示的行数</param>
        /// <param name="totalrecord"></param>
        /// <returns>企业统计信息</returns>
        System.Data.DataTable GetAreaInfoList(string timeFrom, string timeTo, string timeFromH, string timeToH, string timeFromP, string timeToP, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 配送企业配送率查询
        /// </summary>
        /// <param name="companyame"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        System.Data.DataTable ExecutePagePSL(string companyame, string orderby, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取图标数据(采购)
        /// </summary>
        /// <returns></returns>
        DataTable GetSuperviseChart1(object sqlwhere);
        /// <summary>
        /// 各市配送率汇总
        /// </summary>
        /// <returns></returns>
        System.Data.DataTable getAreaSHIlIST(string orderby, string Area, string source);

        /// <summary>
        /// 获取图标数据(配送)
        /// </summary>
        /// <returns></returns>
        DataTable GetSuperviseChart2(object sqlwhere);

        /// <summary>
        /// 生产企业图标汇总
        /// </summary>
        /// <returns></returns>
        DataTable GetSuperviseCompanySC_Chart();
        /// <summary>
        /// 各县区配送率汇总
        /// </summary>
        /// <param name="hosproce"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        //System.Data.DataTable getAreaXianquList(string areaid, string orderby, int currentpage, int pagesize, string ConStr, out int totalrecord);
        System.Data.DataTable getAreaXianquList(string areaid, string orderby, string source, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 修复所有月份
        /// </summary>
        /// <param name="dt">要补齐的table </param>
        /// <param name="flags">0 季月份 ，1 年月份，2 普通页面显示，补齐前12个月</param>
        /// <param name="statioryear">第几季或年，0 普通页面</param>
        /// <param name="monthcolunmname">月份字段名称</param>
        /// <returns></returns>
        DataTable FixAllMonth(DataTable dt, int flags, int statioryear, string monthcolunmname);

        /// <summary>
        /// 修复所有月份(有时间选择)
        /// </summary>
        /// <param name="dt">要补齐的table</param>
        /// <param name="Timeto">截至时间</param>
        /// <param name="Timefrom">开始时间</param>
        /// <param name="monthcolunmname">月份字段名称</param>
        /// <returns></returns>
        DataTable FixAllMonth(DataTable dt, DateTime Timeto, DateTime Timefrom, string monthcolunmname);

        /// <summary>
        /// 查询配送企业配送能力
        /// </summary>
        /// <param name="starttime">开始时间</param>
        /// <param name="endtime">结束时间</param>
        /// <param name="pageindex">开始页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="recordcount">总记录</param>
        /// <returns>返回数据集</returns>
        DataTable GetHospitalCover(string whereAreaid, string starttime, string endtime, int pageindex, int pagesize, out int recordcount);

        /// <summary>
        /// 订单覆盖率统计
        /// </summary>
        /// <param name="starttime">开始时间</param>
        /// <param name="endtime">结束时间</param>
        /// <param name="pageindex">开始页</param>
        /// <param name="pagesize">页大小</param>
        /// <param name="recordcount">总记录</param>
        /// <returns>返回数据集</returns>
        DataTable GetOrderCover(string whereAreaId, string starttime, string endtime, int pageindex, int pagesize, out int recordcount);

        /// <summary>
        /// 配送企业配送金额统计
        /// </summary>
        /// <param name="companyname">企业名称</param>
        /// <param name="orderby">排序字段</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页大小</param>
        /// <param name="totalrecord">总记录</param>
        /// <returns>返回数据集</returns>
        DataTable ExecutePagePSLQuery(string companyname, string orderby, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 生产企业配送金额统计
        /// by张雄  2011.5.26
        /// </summary>
        /// <param name="companyname">企业名称</param>
        /// <param name="orderby">排序</param>
        /// <param name="currentpage">当前页</param>
        /// <param name="pagesize">每页的条数</param>
        /// <param name="totalrecord">总记录</param>
        /// <returns>配送金额统计数据</returns>
        DataTable ExecutePagePSL_SC(int i, string areaid, string companyname, string source, string orderby, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 医院汇总统计
        /// </summary>
        /// <param name="hosptialname"></param>
        /// <param name="source"></param>
        /// <param name="orderby"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable ExecutePagePSL_HOS(string areaid, string hosptialname, string source, string orderby, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 采购类型汇总
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable ExecutePagePSL_SortSource(string where, string orderby, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 曹鹏
        /// 2011年5月30日17:33:06
        /// 采购类型汇总（根据地区分组）
        /// </summary>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable ExecutePagePSL_SortSourceByArea(string str, string where, string orderby, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 药品类别汇总
        /// </summary>
        /// <param name="sortname"></param>
        /// <param name="orderby"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable ExecutePagePSL_Sort(int i, string areaid, string sortname, string orderby, int currentpage, int pagesize, out int totalrecord);



        /// <summary>
        /// 区域配送金额统计
        /// </summary>
        /// <param name="orderby"></param>
        /// <returns></returns>
        DataTable getAreaSHIlISTByArea(string orderby);

        /// <summary>
        /// 区县金额统计
        /// </summary>
        /// <param name="areaid"></param>
        /// <param name="orderby"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable getAreaXianList(string areaid, string orderby, int currentpage, int pagesize, out int totalrecord);

        ///// <summary>
        ///// 产品配送金额统计
        ///// </summary>
        ///// <param name="proce"></param>
        ///// <param name="ordrby"></param>
        ///// <param name="currentpage"></param>
        ///// <param name="pagesize"></param>
        ///// <param name="totalrecord"></param>
        ///// <returns></returns>
        //DataTable getGoodsPSLList(HZ.Supervise.Model.ProcureCatalog proce, string ordrby, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 配送企业列表（高值）
        /// </summary> 
        DataTable GetCompanyPS_ZongList(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 配送企业列表（低值）
        /// </summary>  
        DataTable GetCompanyPS_ZongList_DZ(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 产品列表
        /// </summary>
        /// <param name="proce"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetCompanyGoodsList(HZ.Supervise.Model.ProcureCatalog proce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 产品信息列表（高值）
        /// </summary> 
        DataTable GetCompanyGoodsListByAreaID(string areaid,HZ.Supervise.Model.ProcureCatalog proce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 产品信息列表（低值）
        /// </summary>  
        DataTable GetCompanyGoodsListByAreaID_DZ(string areaid, HZ.Supervise.Model.ProcureCatalog proce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 查询医院详细（高值）
        /// </summary> 
        DataTable GetCompanyGoodsList_ps(HZ.Supervise.Model.View.HospitalProcureCatalog proce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 查询医院详细（低值）
        /// </summary> 
        DataTable GetCompanyGoodsList_ps_DZ(HZ.Supervise.Model.View.HospitalProcureCatalog proce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 查看医院列表（高值）
        /// </summary>  
        DataTable GetHospitalInfo(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 查看医院列表（低值）
        /// </summary>  
        DataTable GetHospitalInfo_DZ(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord); 
        /// <summary>
        /// 产品明细信息（高值）
        /// </summary> 
        DataTable GetCompanyPsList_JG_Message(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 产品明细信息（低值） 
        /// </summary> 
        DataTable GetCompanyPsList_JG_Message_DZ(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 产品相关配送企业和医院列表（高值）
        /// </summary> 
        DataTable GetCompanyPsList_JG(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 产品相关配送企业和医院列表（低值）
        /// </summary>  
        DataTable GetCompanyPsList_JG_DZ(HZ.Supervise.Model.View.HospitalProcureCatalog hosproce, int currentpage, int pagesize, out int totalrecord);

        //DataTable ExecutePagePSLOne(string areaid, int i, string companyname, string sortsource, string orderby, int currentpage, int pagesize, out int totalrecord);

        DataTable ExecutePagePSLOne(SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);



        DataTable ExcuteType(int currentpage, int pagesize, out int totalrecord, string Mid, string Sortsource, string orderby, string strAreaid);

        DataTable ExecuteDetails(int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 地区
        /// 所有药品信息
        /// by张雄  2011.5.12
        /// </summary>
        /// <param name="where">where条件</param>
        /// <param name="currentpage">分页当前页</param>
        /// <param name="pagesize">每页的条数</param>
        /// <param name="totalrecord">参数</param>
        /// <returns>所有药品信息</returns>
        DataTable ExecuteDetailsArea(string where, string order, int currentpage, int pagesize, out int totalrecord);

        DataTable ExecutePageFirst(int currentpage, int pagesize, out int totalrecord, string strSortSorce, string strOrderby, string strAreaID, string strDaytime);

        DataTable ExecutePSData(int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 曹鹏
        /// 2011年5月20日9:21:47
        /// 医院某种采购类型所占比例
        /// </summary>
        /// <param name="hosName">医院名称</param>
        /// <param name="sortSource">采购类型</param>
        /// <param name="areaid">地区编号</param>
        /// <param name="pageSize"></param>
        /// <param name="currentPageIndex"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        DataTable ExecuteRateOfHospitalSource(string timeFrom, string timeTo, string hosName, string sortSource, string areaid, string compare, string rate, string sort, int pageSize, int currentPageIndex, out int total);


        /// <summary>
        /// by：张雄
        /// 采购次数
        /// </summary>
        /// <param name="timeFrom">时间从</param>
        /// <param name="timeTo">到</param>
        /// <param name="hosName">医院名称</param>
        /// <param name="areaid">地区Id</param>
        /// <param name="pageSize"></param>
        /// <param name="currentPageIndex"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        DataTable ExecuteRateOfHosSourceCount(string timeFrom, string timeTo, string hosName, string areaid, string flag, int pageSize, int currentPageIndex, out int t);

        /// <summary>
        /// 曹鹏
        /// 2011年5月20日14:38:38
        /// 地区某种采购类型所占比例（县区）
        /// </summary>
        /// <param name="hosName">医院名称</param>
        /// <param name="sortSource">采购类型</param>
        /// <param name="areaid">地区编号</param>
        /// <param name="pageSize"></param>
        /// <param name="currentPageIndex"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        DataTable ExecuteRateOfAreaSource(string timeFrom, string timeTo, string sortSource, string areaid, string compare, string rate, string sort, int pageSize, int currentPageIndex, out int total);
        /// <summary>
        /// 曹鹏
        /// 2011年5月20日14:38:38
        /// 地区某种采购类型所占比例(城市)
        /// </summary>
        /// <param name="hosName">医院名称</param>
        /// <param name="sortSource">采购类型</param>
        /// <param name="areaid">地区编号</param>
        /// <param name="pageSize"></param>
        /// <param name="currentPageIndex"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        DataTable ExecuteRateOfAreaSource1(string timeFrom, string timeTo, string City, string areaGroupBy, string sortSource, string compare, string rate, string sort, int pageSize, int currentPageIndex, out int total);

        /// <summary>
        /// 生产企业汇总
        /// </summary>
        /// <param name="vs"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable ExecutePagePSL_SC(HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 订单明细查看（高值）
        /// </summary> 
        DataTable GoodsOrderDetail(string where, int i, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 订单明细查看（低值）
        /// </summary> 
        DataTable GoodsOrderDetail_DZ(string where, int i, int currentpage, int pagesize, out int totalrecord); 
        /// <summary>
        /// 生产企业分类汇总
        /// </summary>
        /// <param name="where"></param>
        /// <param name="i"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable CompanySC_InfoByType(SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 配送企业分类汇总
        /// </summary>
        /// <param name="where"></param>
        /// <param name="orderby"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable CompanyPS_InfoByType(SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 医院统计
        /// </summary>
        /// <param name="i">1代表医院统计，2代表医院下面药品统计</param>
        /// <param name="IsCountry">医疗机构</param>
        /// <param name="timeto">起始时间</param>
        /// <param name="timeform">结束时间</param>
        /// <param name="strwhere">where条件</param>
        /// <param name="orderby">排序方式</param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalStatistics(int i, string IsCountry, string timeto, string timeform, string strwhere, string orderby, string areaid, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 药品汇总统计（高值）
        /// </summary>
        /// <param name="i">哪个数据源</param>
        /// <param name="strwhere">where条件</param> 
        DataTable GetGoodsStatistics(int i,string strwhere, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 药品汇总统计（低值）
        /// </summary>
        /// <param name="i">哪个数据源</param>
        /// <param name="strwhere">where条件</param> 
        DataTable GetGoodsStatistics_DZ(int i, string strwhere, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计5（高值）
        /// </summary> 
        DataTable GetReport5(DateTime SubmiTimeFrom, DateTime SubmiTimeTo, HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计4（高值）
        /// </summary> 
        DataTable GetReport4(HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计3（高值）
        /// </summary> 
        DataTable GetReport3(HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计2（高值）
        /// </summary> 
        DataTable GetReport2(HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计1（高值）
        /// </summary> 
        DataTable GetReport1( string orderby, HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计6（高值）
        /// </summary> 
        DataTable GetReport6(string orderby, HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计7（高值）
        /// </summary> 
        DataTable GetReport7(HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 月报统计8（高值）
        /// </summary> 
        DataTable GetReport8(HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 最高价及最低价采购情况
        /// </summary> 
        DataTable GetReportHL(string str, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 最高价采购明细
        /// </summary> 
        DataTable GetReportH(string str, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 最低价采购明细
        /// </summary> 
        DataTable GetReportL(string str, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 汇总统计（高值）
        /// </summary> 
        DataTable GetStatistics(int flag, string orderby, HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 汇总统计（低值） 
        /// </summary> 
        DataTable GetStatistics_DZ(int flag, string orderby, HZ.Supervise.Model.SuperviseQuery vs, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 查看医院订单明细
        /// </summary>
        /// <param name="str"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalRecord"></param>
        /// <returns></returns>
        DataTable GetHospitalStatisticsMX(string orderby, string where, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 统计医院订单明细
        /// </summary>
        /// <returns></returns>
        DataTable GetHospitalStatisticsCount(string where); 
        /// <summary>
        /// 查看医疗机构大型设备采购合同
        /// </summary> 
        DataTable GetOrderDXSB(HZ.Supervise.Model.Query.QOrderDXSB query, int currentPage, int pageSize, out int totalRecord);
        DataTable GetOrderDXSB2(string str, int currentPage, int pageSize, out int totalRecord); 
        /// <summary>
        /// 获取分类名称
        /// </summary> 
        DataTable GetSortNameDXSB();
        /// <summary>
        /// 医疗机构获取合同内明细
        /// </summary>  
        DataTable GetOrderDetailDXSB(HZ.Supervise.Model.Query.QGoodsDXSB query, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 获取单个合同内的明细
        /// </summary> 
        DataTable GetOneDetailDXSB(string str);
        /// <summary>
        /// 中心获取所有明细
        /// </summary>    
        DataTable GetAllDetailDXSB2(HZ.Supervise.Model.Query.QGoodsDXSB query, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 获取类别采购信息
        /// </summary>    
        DataTable GetAllPurchaseSummary(HZ.Supervise.Model.Query.QGoodsDXSB query, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 获取类别采购信息
        /// </summary>    
        DataTable GetAllPurchaseSummaryTotal(HZ.Supervise.Model.Query.QGoodsDXSB query);
        DataTable GetAllPurchaseSummaryTotal2(HZ.Supervise.Model.Query.QGoodsDXSB query);
        DataTable GetAllPurchaseSummaryTotal3(HZ.Supervise.Model.Query.QGoodsDXSB query);
        DataTable GetAllPurchaseSummaryTotal4(HZ.Supervise.Model.Query.QGoodsDXSB query);
        /// <summary>
        /// 获取裸机价格信息
        /// </summary>  
        DataTable GetBarepriceGT(HZ.Supervise.Model.Query.QGoodsDXSB query, int currentPage, int pageSize, out int totalRecord);
        DataTable GetBarepriceGTTotal(HZ.Supervise.Model.Query.QGoodsDXSB query);
        /// 获取地区下的医疗机构
        /// </summary>
        /// <param name="vs"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalByAreaId(string where, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 获取阳光积分
        /// </summary>
        /// <param name="vs"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetSunScore(string where, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 查看预警月
        /// </summary> 
        DataTable GetWarnwords(string str, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 查看预警数据
        /// </summary> 
        DataTable GetHospitalWarn(string str, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 预警图片
        /// </summary> 
        DataTable GetWarnword(string str, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 更新整改提交状态
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        int WarnwordsSubmit(string Urlid, int flag);
        /// <summary>
        /// 查看医疗机构阳光积分
        /// </summary>
        DataTable GetSunMark(string str, int currentPage, int pageSize, out int totalRecord);
        /// <summary>
        /// 医院积分情况统计
        /// </summary>
        DataTable GetHospitalScoreStatistics(string str, int currentPage, int pageSize, out int totalRecord);       
        /// <summary>
        /// 新增一个阳光积分数据
        /// </summary>
        /// <param name="sun"></param>
        /// <returns></returns>
        int InsertSunScore(SunScore sun);
        
        /// <summary>
        /// 修改一个阳光积分
        /// </summary>
        /// <param name="sun"></param>
        /// <returns></returns>
        int UpdateSunScore(SunScore sun);
        
        /// <summary>
        /// 获取一个医院的积分
        /// </summary>
        /// <param name="hospitalid"></param>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <returns></returns>
        DataTable GetSunScoreByHospital(string hospitalid, int year, int month);
        

        /// <summary>
        /// todo：汇总金额类别统计
        /// JOHN
        /// </summary>
        /// <returns>汇总金额类别统计数据源</returns>
        System.Data.DataTable GetAmountType(string str);

        /// <summary>
        /// todo：汇总金额，按照月份
        /// JOHN
        /// </summary>
        /// <returns></returns>
        System.Data.DataTable GetAmountByMonth(string str, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 超过12小时未响应的药品
        /// </summary>
        /// <param name="pro"></param>
        /// <returns></returns>
        DataTable Get12HourByProcureCatalog(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 超过12小时未配送的企业列表
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable Get12HourByCompany(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);

        /// <summary>
        /// 超过12小时未配送的采购详情
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable Get12HourByPurchase(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 超过24小时未响应的药品
        /// </summary>
        /// <param name="pro"></param>
        /// <returns></returns>
        DataTable Get24HourByProcureCatalog(HZ.Supervise.Model.SuperviseQuery pro, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 超过24小时未配送的企业列表
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable Get24HourByCompany(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 超过24小时未配送的采购详情
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable Get24HourByPurchase(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 获取医疗机构计划采购与实际入库的数据
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlan(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);


        /// <summary>
        /// 获取医疗机构计划采购与实际入库的数据生产企业明细
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlanByCompanySC(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);
       

        /// <summary>
        /// 获取医疗机构计划采购与实际入库的数据医疗机构明细
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlanByHospital(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);


         /// <summary>
        /// 正常填报采购计划的医院列表
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlanListByNormal(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);
         


        /// <summary>
        /// 正常填报采购计划的医院列表详情
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlanListByNormalDetail(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);
         


        /// <summary>
        /// 采购计划填报为0的医院列表
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlanListByZero(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);
        


        /// <summary>
        /// 没有填报采购计划的医院列表
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetHospitalPurchasePlanListByNone(SuperviseQuery sq, int currentpage, int pagesize, out int totalrecord);
        

        /// <summary>
        /// 药品流水表
        /// </summary>
        /// <param name="sq"></param>
        /// <param name="currentpage"></param>
        /// <param name="pagesize"></param>
        /// <param name="totalrecord"></param>
        /// <returns></returns>
        DataTable GetYiBaoList(SuperviseQuery sq);

        /// <summary>
        ///  获取药品信息
        /// </summary>
        /// <param name="ProcureCatalogID"></param>
        /// <returns></returns>
        HZ.Supervise.Model.View.ProcureCatalog GetProcureCatalogByID(string ProcureCatalogID);
        /// <summary>
        /// 医疗机构高于加权平均价采购明细
        /// </summary> 
        DataTable GetMoreJQPricemingxi(string str, int currentpage, int pagesize, out int totalrecord);
        /// <summary>
        /// 医疗机构省内最高价格采购明细
        /// </summary> 
        DataTable GetMoreShenPricemingxi(string str, int currentpage, int pagesize, out int totalrecord);

    }
}
